<!--
 * @Description: 入口
 * @Author: flyer
 * @Date: 2022-04-13 17:24:40
 * @LastEditTime: 2022-04-13 22:39:40
 * @LastEditors: flyer
-->
<template>
  <router-view v-slot="{ Component }">
    <keep-alive :include="activeRoute">
      <component :is="Component" />
    </keep-alive>
  </router-view>
</template>
<script lang="ts">
import { computed } from "vue";
import { useStore } from "vuex";
export default {
  setup() {
    const $store = useStore();
    const activeRoute = computed(() => {
      return $store.state.activeRoute;
    });
    return {
      activeRoute,
    };
  },
};
</script>
